<?php
	class Base{








		static public function router($departure){
			//$departure = str_replace('\'','', $departure);
			$target = APP_PATH.'/'.ucfirst($departure).'/Index.php';
			echo $target;
			if(!file_exists($target)){
				echo "Page Error!!!";
				exit();
			}
			header('Location:'.$target);

		}



		static public function setStripslashes(){
			if (!function_exists('get_magic_quotes_gpc') || @get_magic_quotes_gpc()) {
				function rs($s) {
					if(is_array($s)) {
						foreach ($s as $k => $v)
							$s[$k] = rs($v);
					} else {
						$s = stripslashes($s);
						 // $s = addslashes($s);
					}
					return $s;
				}
				$_GET = rs($_GET);
				$_POST = rs($_POST);
				$_COOKIE = rs($_COOKIE);
			}

		}





        static public function __loadSystem($file){
            if(!file_exists($file)){
                echo "System file".$file."error";
            }else{
                include $file;
            }

        }




















    }
